package cn.edu.scau.cmi.dengzejun.chapter04;
import java.util.*;

public class Electricity {
	public static void main(String agr[]) {
		final double  e1=0.6,e2=1.1,e3=1.7;
		Scanner reader=new Scanner(System.in);
		double sumPrice=0;
		double electricity=reader.nextDouble();
		if (electricity>151) {
			sumPrice+=(electricity-151)*e3+(150-91+1)*e2+(90-1+1)*e1;
		}else if (electricity>91) {
			sumPrice+=(electricity-91)*e2+(90-1+1)*e1;
		}else {
			sumPrice+=(electricity*e1);
		}
		System.out.println(sumPrice);
		reader.close();
	}
}
